//
//  ViewController.m
//  ZZRAC
//
//  Created by 赵梁 on 2018/10/31.
//  Copyright © 2018 layzhao. All rights reserved.
//

#import "ViewController.h"

#import <ReactiveObjC.h>

@interface ViewController ()

@property (nonatomic, copy) NSString* username;//!< 

@property (nonatomic, copy) NSString* password;//!<
@property (nonatomic, copy) NSString* passwordConfirmation;//!<

@property (nonatomic, assign) BOOL createEnabled;//!<


@property (nonatomic, strong) id subscriber;//!<

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
//    [RACObserve(self, username) subscribeNext:^(NSString *newName) {
//        NSLog(@"%@", newName);
//    }];
//
//
//    [[RACObserve(self, username)
//      filter:^(NSString *newName) {
//          return [newName hasPrefix:@"j"];
//      }]
//     subscribeNext:^(NSString *newName) {
//         NSLog(@"%@", newName);
//     }];
//
//
//    RAC(self, createEnabled) = [RACSignal
//                                combineLatest:@[ RACObserve(self, password), RACObserve(self, passwordConfirmation) ]
//                                reduce:^(NSString *password, NSString *passwordConfirm) {
//                                    return @([passwordConfirm isEqualToString:password]);
//                                }];
    
//    [self signal];
    
}



@end
